<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>swiper基本应用</title>
		<link rel="stylesheet" href="css/swiper.min.css" type="text/css" />
		<style type="text/css">
			.swiper-container {
				background: orangered;
				height: 300px;
				width: 600px;
				color: #FFFFFF;
				font-size: 60px;
				text-align: center;
				line-height: 300px;				
				
			}
		</style>
	</head>

	<body>
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<div class="swiper-slide">Slide 1</div>
				<div class="swiper-slide">Slide 2</div>
				<div class="swiper-slide">Slide 3</div>
				<div class="swiper-slide">Slide 4</div>
				<div class="swiper-slide">Slide 5</div>
				<div class="swiper-slide">Slide 6</div>
				<div class="swiper-slide">Slide 7</div>
				<div class="swiper-slide">Slide 8</div>
				<div class="swiper-slide">Slide 9</div>
				<div class="swiper-slide">Slide 10</div>
			</div>
			<!-- 如果需要分页器 -->
			<div class="swiper-pagination"></div>

			<!-- 如果需要导航按钮 -->
			<div class="swiper-button-prev"></div>
			<div class="swiper-button-next"></div>
		</div>
		<script type="text/javascript" src="js/swiper.min.js"></script>
		<script type="text/javascript">
			var swiper = new Swiper('.swiper-container', {
				autoplay:{
					delay:2000,
					disableOnInteraction: false,//用户操作之后是否停止自动轮播默认true 
				},
				direction: 'vertical', // 垂直切换选项
				loop: "true",
				// 如果需要分页器
				pagination: {
					el: '.swiper-pagination',
				},
				// 如果需要前进后退按钮
				navigation: {
					nextEl: '.swiper-button-next',
					prevEl: '.swiper-button-prev',
				}
			});
		</script>
	</body>

</html>